import React, { Component } from "react";
import styles from "./Everymall.module.scss";
import {connect} from 'react-redux'
import store from '../../../redux/store/index'
import {withRouter} from 'react-router-dom'
import {getMallInfoAction} from '../../../redux/actionCreators/search_action/index'
 class Everymall extends Component {
  handleGoBack=(params) => {
    this.props.history.go(-1)
  }
   componentDidMount(){
         
   }
  render() {
 
    console.log(this.props.MallInfo&&this.props.MallInfo.delivery_mode.color);
  
    return (
      
        <div className={styles.Mallbox}>
          <div className={styles.goback} onClick={this.handleGoBack}>{"<"}</div>
        <div className={styles.EverymallBox} >
        <div className={styles.header} style={{backgroundColor:"red",fontSize:"16px"}}>
          <div className={styles.headerTop}>
            <div className={styles.headerTopLeft}>
              <img src={this.props.MallInfo&&this.props.MallInfo.image_path} alt="" />
            </div>
            <div className={styles.headerTopRight}>
              <div className={styles.headerTopRightTitle}>{this.props.MallInfo&&this.props.MallInfo.name}</div>
              <div className={styles.headerTopRightSendFee}>商家配送 /分钟送达  {this.props.MallInfo&&this.props.MallInfo.piecewise_agent_fee.tips} </div>
              <div className={styles.headerTopRightAdv}>公告： {this.props.MallInfo&&this.props.MallInfo.promotion_info}</div>
            </div>
          </div>

          <div className={styles.headerFBottom}>
            <div className={styles.headerFBottomLeft}>  {this.props.MallInfo&&this.props.MallInfo.activities[0].description}    (App专享)</div>
            <div className={styles.headerFBottomRight}>{this.props.MallInfo&&this.props.MallInfo.activities.length}个活动 &nbsp;&nbsp;&nbsp;{'>'}    </div>
          </div>
        </div>
        <div className={styles.bar}></div>
        <div className={styles.content}></div>
        <div className={styles.footer}></div>
      </div>




<div className={styles.midList}>
    <div className={styles.listLeft}>商品</div>
    <div className={styles.listRight}>评价</div>
</div>
        </div>
      
    );
  }
}
export default  connect((state)=>{

return {
    inputData:state.searchReducer.inputData,
    MallInfo:state.searchReducer.MallInfo
}
},()=>{
    return {}
})(withRouter(Everymall))

